﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aij1.BLL;
using Aij1.Model;
using Aij1.Cms;
using Aij1.Utils;
using DevExpress.Xpo;

namespace Aij1
{
    public partial class Special : BasePage
    {
        protected A_Special Article;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (Article == null)
            {
                Response.Write("没有找到此Id对应的新闻.");
                Response.End();
            }
            if (Article.MenuId != null)
                CSM.FocusedId = Article.MenuId.Oid;
            PageName = Article.Title;
            Keywords = Article.Keywords;
            Description = Article.Intro;
        }

        protected void Page_init(object sender, EventArgs e)
        {
            int newsId = CommOp.ToInt(Request.QueryString["Id"]);
            if (newsId > 0)
            {
                Article = XpoSession.GetObjectByKey<A_Special>(newsId);
            }

            if (Article == null)
            {
                Response.Write("没有找到文章。");
                Response.End();
            }
        }
    }
}